package com.blog.service;

import com.blog.dao.AdminUserDao;
import com.blog.entity.AdminUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminUserService {
    @Autowired
    private AdminUserDao adminUserDao;

    /**
     * 判断账号密码是否正确
     * @param userId
     * @param password
     * @return
     */
    public  boolean login(String userId,String password){
        AdminUser adminUser = adminUserDao.getAdminUser(userId,password);
        if (adminUser == null) {
            return false;
        }else{
            return true;
        }
    }
}
